from email.policy import default
from pyexpat import model
from django.db import models

# Create your models here.
# 创建模型数据

from django.contrib.auth.models import User

class UserProfile(models.Model):
    USER_GENDER_TYPE = (
        ('male','男'),
        ('female','女'),
    )
    # CharField  -- 文本字段  DateField -- 时间字段  ImageField -- 图形字段
    ower = models.OneToOneField(User,on_delete=models.CASCADE,verbose_name='用户')
    uzi_name = models.CharField("昵称",max_length=23,blank=True,default="")
    birthday = models.DateField("生日",null=True,blank=True)
    gender = models.CharField("性别",max_length=6,choices=USER_GENDER_TYPE,default="male")
    address = models.CharField("地址",max_length=100,blank=True,default="")
    image = models.ImageField(upload_to ="images/%Y/%m",default = "images/default.png",max_length=100,verbose_name="用户头像")
